Most real time operating systems mounted to embedded systems employ a preemptive task scheduling method based on a priority. The real time operating systems employ a round robin task scheduling method where a task having arrived first is executed first when the priority of tasks are the same. As described above, the preemptive round robin task scheduling methods are intuitive to programmers, and thus are generally widely used.
However, the priority based scheduling methods are not always the best solutions. In particular, when an execution time of a task having a high priority is very long, a task having a low priority needs to wait until the task of the high priority is completely executed, which may cause the task having the low priority not to be executed. If a program is performed, an execution time of a task may become longer and even an unlimited loop may be encountered. Thus, it is not so pleasant for a programmer to determine a priority of a task except for when the task needs to be urgently executed.
It is round robin scheduling that has been suggested to solve the priority based problem. Even execution times of tasks become longer or are blocked, time division equally provides opportunities for executing tasks. In this case, when the number of tasks is n and the n tasks are executed in the form of round robin, a CPU occupancy rate of one task becomes 1/n, making it impossible to usefully use a CPU.